﻿using System;
using System.Text;

class OddNumber
{
    static void Main(string[] args)
    {
        System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;

        int count = int.Parse(Console.ReadLine());
        long[] numbers = new long[count];

        for (int i = 0; i < count; i++)
        {
            numbers[i] = long.Parse(Console.ReadLine());
        }

        Array.Sort(numbers);

        long currentElement = numbers[0];
        int currentElementCount = 1;
        for (int i = 1; i < count; i++)
        {
            if (currentElement == numbers[i])
            {
                currentElementCount++;
            }
            else
            {
                if (currentElementCount % 2 == 1)
                {
                    break;
                }
                else
                {
                    currentElement = numbers[i];
                    currentElementCount = 1;
                }
            }
        }
        Console.WriteLine(currentElement);

    }
}
